<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>河北涿州 - 京畿南大门的历史与风情</title>
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <!-- 导航栏（复用） -->
  <nav class="navbar">
    <div class="container">
      <a href="index.html" class="logo">涿州印象</a>
      <ul class="nav-links">
        <li><a href="index.html" class="active">首页</a></li>
        <li><a href="history.html">历史渊源</a></li>
        <li><a href="attractions.html">景点推荐</a></li>
        <li><a href="culture.html">文化特色</a></li>
        <li><a href="food.html">美食攻略</a></li>
      </ul>
    </div>
  </nav>

  <!-- 英雄区域 -->
  <header class="hero">
    <div class="container">
      <h2>京畿南大门 · 千年古县</h2>
      <p>“日边冲要无双地，天下繁难第一州”——涿州欢迎您</p>
      <a href="attractions.html" class="btn">探索景点</a>
    </div>
  </header>

  <!-- 核心优势 -->
  <section class="features">
    <div class="container">
      <h2 style="text-align: center; margin-bottom: 2rem;">涿州魅力</h2>
      <div class="features-grid">
        <div class="feature-card">
          <h3>历史悠久</h3>
          <p>建制2300余年，战国属燕、秦置涿县，明清为涿州路，乾隆御封“天下第一州”</p>
        </div>
        <div class="feature-card">
          <h3>文化璀璨</h3>
          <p>三国文化发祥地、“天下第一州”美誉、辽代双塔等文物古迹</p>
        </div>
        <div class="feature-card">
          <h3>区位优越</h3>
          <p>京、津、保三角区中心，距天安门62公里，京港澳高速、京广铁路贯穿</p>
        </div>
      </div>
    </div>
  </section>

  <!-- 景点预览 -->
  <section class="attraction-preview">
    <div class="container">
      <h2>热门景点抢先看</h2>
      <div class="attraction-grid">
        <div class="attraction-item">
          <img src="image/涿州双塔.jpg" alt="涿州双塔">
          <div class="attraction-content">
            <h3>涿州双塔</h3>
            <p>辽代楼阁式砖塔，中国现存辽塔中保存较少的楼阁式砖塔</p>
            <a href="attractions.html#twin-towers" class="btn-small">详情</a>
          </div>
        </div>
        <div class="attraction-item">
          <img src="image/涿州三义宫.jpg" alt="三义宫">
          <div class="attraction-content">
            <h3>三义宫</h3>
            <p>刘备、关羽、张飞桃园三结义故地，始建于隋代</p>
            <a href="attractions.html#three-brothers-temple" class="btn-small">详情</a>
          </div>
        </div>
        <div class="attraction-item">
          <img src="image/涿州永济桥.jpg" alt="永济桥">
          <div class="attraction-content">
            <h3>永济桥</h3>
            <p>明万历年间建，京畿重要交通桥梁，“涿州八景”之一</p>
            <a href="attractions.html#yongji-bridge" class="btn-small">详情</a>
          </div>
        </div>
      </div>
    </div>
  </section>

  <!-- 页脚 -->
  <footer class="footer">
    <div class="container">
      <p>&copy; 2025 河北涿州介绍网站 | 设计：HTML5+CSS3+JS</p>
    </div>
  </footer>

  <!-- JavaScript交互 -->
  <script>
    // 导航栏激活状态切换
    const navLinks = document.querySelectorAll('.nav-links a');
    navLinks.forEach(link => {
      link.addEventListener('click', function(e) {
        e.preventDefault();
        // 移除所有激活状态
        navLinks.forEach(l => l.classList.remove('active'));
        // 添加当前激活状态
        this.classList.add('active');
        // 平滑滚动到目标区域（若为首页则不滚动）
        if (this.getAttribute('href') !== '#') {
          const targetId = this.getAttribute('href').substring(1);
          const targetSection = document.getElementById(targetId);
          if (targetSection) {
            targetSection.scrollIntoView({ behavior: 'smooth' });
          } else {
            window.location.href = this.getAttribute('href');
          }
        }
      });
    });

    // 特性卡片点击跳转
    const featureCards = document.querySelectorAll('.feature-card');
    featureCards.forEach(card => {
      card.addEventListener('click', function() {
        const cardTitle = this.querySelector('h3').textContent;
        let targetPage = '';
        switch(cardTitle) {
          case '历史悠久':
            targetPage = 'history.html';
            break;
          case '文化璀璨':
            targetPage = 'culture.html';
            break;
          case '区位优越':
            targetPage = 'attractions.html';
            break;
        }
        if (targetPage) {
          window.location.href = targetPage;
        }
      });
    });

    // 页面加载动画
    document.addEventListener('DOMContentLoaded', function() {
      const hero = document.querySelector('.hero');
      hero.style.opacity = '0';
      setTimeout(() => {
        hero.style.transition = 'opacity 1s ease';
        hero.style.opacity = '1';
      }, 100);
    });
  </script>
</body>
</html>